<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head lang="en">
    <meta charset="UTF-8">
    <title>红岩网校工作站内部管理平台</title>
    <link rel="stylesheet" type="text/css" href="css/main.css">
    <link rel="stylesheet" type="text/css" href="css/task.css">
    <link rel="stylesheet" type="text/css" href="css/submit.css">
    <link rel="stylesheet" type="text/css" href="css/mystyle.css"/>

</head>
<body>
    <div id="main">
        <div id="header">
            <div>
                <ul class="feature">
                    <li class="more_fun iconfont">更多操作  &#xe621;</li>
                    <li class="more_info">
                        <ul>
                            <li class="re_pwd">修改密码</li>
                            <li class="re_con">修改个人信息</li>
                            <li class="quit">退出</li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
        <div id="aside"></div>
        <div id="content">
            <div class="content_left">
                <div class="list_kind">
                  <ul class="list_kind_ul">
                    <li id="list_kind" class="list target">HHH</li>
                  </ul>
                </div>
                <div class="task_con"></div>
                 <div class="page_num">
                       <a class="turn pre" href="#">上一页</a>
                       <a href="#" class="page_onclick">1</a>
                       <a href="#">2</a>
                       <a href="#">3</a>
                       <a href="#">4</a>
                       <a href="#">...</a>
                       <a href="#">99</a>
                       <a class="turn next" href="#">下一页</a>
                  </div>
            </div>

            <div class="content_right"></div>
        </div>
    </div>

</body>

<!-- Templates -->

<script type="text/template" id="ul">
    <% people.forEach(function(value,index){%>
    <li data-id="<%= value.dataId %>"><%= value.name %></li>
    <% }); %>
</script>
<script type="text/template" id="right_top">
    <div class="right_top">
        <p class="personal">个人信息</p>
        <ul>
            <li>姓名：<span class="p_name"><%= personal.std_name %></span></li>
            <li>部门：<span class="p_department"><%= personal.std_department %></span></li>
            <li>导师：<span class="p_position"><%= personal.std_teacher %></span></li>
            <li>学号：<span class="p_id"><%= personal.std_id %></span></li>
            <li>电话：<span class="p_num"><%= personal.std_phone %></span></li>
            <li>QQ：<span class="p_qq"><%= personal.std_qq %></span></li>
            <li>邮箱：<span class="p_mail"><%= personal.std_email %></span></li>
        </ul>

    </div>
</script>
<script type="text/template" id="right_bottom">
    <div class="right_bottom">
        <ul>
            <li class="metion"><p class="ing_num"><%= personal.RunningMission %></p><p class="des">进行中任务</p></li>
            <li class="metion_right"><p class="ed_num"><%= personal.SuccessMission %></p><p class="ed_des">已完成任务</p></li>
        </ul>
    </div>
</script>


<script type="text/template" id="task_unfin_template">
    <% unfinished.forEach(function(value,index){ %>
    <div class="task">
        <p class="title"><%= value.title %></p><span class="title_logo">网校</span>
        <p class="host">发布人:<span class="host_name"><%= value.publisher %></span>
            发布时间:<span class="task_date"><%value.time.begin %></span></p>
        <p class="annocement summary">  <%= value.summary %></p>
        <p class="annocement details" style="display:none;">  <%= value.details %></p>
        <h1>人员分配</h1>
        <p class="fenpei" style="display:none;"><%= value.people %></p>
        <h1>时间安排</h1>
        <!--<p class="anpai" style="display:none;"><%= value.time.begin %>-<%= value.time.end %></p>-->
        <!--<h1>任务附件（点击下载）</h1>-->
        <!--<p class="task_file" style="display:none;"><%= value.accessory %></p>-->
        <span class="more_less more">查看全文</span>
    </div>
    <% });%>
</script>
<script type="text/template" id="task_ing_template">
    <% ing.forEach(function(value,index){ %>
    <div class="task">
        <p class="title"><%= value.title %></p><span class="title_logo">网校</span>
        <p class="host">发布人:<span class="host_name"><%= value.publisher %></span>
            发布时间:<span class="task_date"><%= value.time.begin %></span></p>
        <p class="annocement summary">  <%= value.summary %></p>
        <p class="annocement details" style="display:none;">  <%= value.details %></p>
        <h1>人员分配</h1>
        <p class="fenpei" style="display:none;"><%= value.people %></p>
        <h1>时间安排</h1>
        <!--<p class="anpai" style="display:none;"><%= value.time.begin %>-<%= value.time.end %></p>-->
        <!--<h1>任务附件（点击下载）</h1>-->
        <!--<p class="task_file" style="display:none;"><%= value.accessory %></p>-->
        <!--<div class="upload_file" >-->
            <!--<input type="file" name="upload" value="上传文件">-->
        <!--</div>-->
        <div class="upload-button">
            <div class="upload-cover">
                上传文件
            </div>
            <!-- this is later in the source so it'll be "on top" -->
            <form class="fileupload" method="POST" enctype="multipart/form-data">
                <input name="std_file" type="file" data-url="/upload" />
                <input type="hidden" class="work_id" name="work_id" value="<%= value.work_id %>"/>
            </form>
        </div>
        <input class="upload_task" type="button" name="upload" value="提交任务">
        <span class="more_less more">查看全文</span>
    </div>
    <% });%>
</script>
<script type="text/template" id="task_fin_template">
    <% finished.forEach(function(value,index){ %>
    <div class="task">
        <p class="title"><%= value.title %></p><span class="title_logo">网校</span><span class="score">评分: <span><%= value.score %></span></span>
        <p class="host">发布人:<span class="host_name"><%= value.publisher %></span>
            发布时间:<span class="task_date"><%= value.time.begin %></span></p>
        <p class="annocement summary">  <%= value.summary %></p>
        <p class="annocement details" style="display:none;">  <%= value.details %></p>
        <h1>人员分配</h1>
        <p class="fenpei" style="display:none;"><%= value.people %></p>
        <h1>时间安排</h1>
        <!--<p class="anpai" style="display:none;"><%= value.time.begin %>-<%= value.time.end %></p>-->
        <!--<h1>任务附件（点击下载）</h1>-->
        <!--<p class="task_file" style="display:none;"><%= value.accessory %></p>-->
        <h1>建议</h1>
        <p class="suggest" style="display:none;"><%= value.suggest %></p>

        <span class="more_less more">查看全文</span>
    </div>

    <% });%>
</script>
<script type="text/template" id="task_all_template">
    <% total.forEach(function(value,index){ %>
    <div class="task">
        <p class="title"><%= value.title %></p><span class="title_logo">网校</span><span class="score_logo"><%= value.state %></span>
        <p class="host">发布人:<span class="host_name"><%= value.publisher %></span>
            发布时间:<span class="task_date"><%= value.time.begin %></span></p>
        <p class="annocement summary"><%= value.summary %></p>
        <p class="annocement details" style="display:none;">  <%= value.details %></p>
        <h1>人员分配</h1>
        <p class="fenpei" style="display:none;"><%= value.people %></p>
        <h1>时间安排</h1>
        <!--<p class="anpai" style="display:none;"><%= value.time.begin %>-<%= value.time.end %></p>-->
        <!--<h1>任务附件（点击下载）</h1>-->
        <!--<p class="task_file" style="display:none;"><%= value.accessory %></p>-->
        <span class="more_less more">查看全文</span>
    </div>
    <% });%>
</script>



<script type="text/template" id="aside_template">
    <h1>你好</h1>
    <h1><%= std_name %></h1>
    <ul class="nav">
        <li class="orange personal iconfont">&#xe679;&nbsp;&nbsp;&nbsp;&nbsp;个人中心</li>
        <li class="orange guanli iconfont">&#xe679;&nbsp;&nbsp;&nbsp;&nbsp;发布公告</li>
        <li class="branch">
            <ul>
                <li class="task_list iconfont">&#xf0003;&nbsp&nbsp&nbsp&nbsp任务中心&nbsp&nbsp&#xe621;</li>
                <li class="all_task">全部任务</li>
                <li class="ing_task">待完成任务</li>
                <li class="fin_task">已完成任务</li>
                <li class="unfin_task">已过期任务</li>
                <li class="pub_task">发布任务</li>
                <li class="put_task">提交列表</li>
            </ul>
        </li>
        <li class="orange tongxun iconfont">&#xf0012;&nbsp&nbsp&nbsp&nbsp通讯录</li>
        <li class="orange wenda iconfont">&#xe616;&nbsp&nbsp&nbsp&nbsp问答</li>
    </ul>
</script>

<script type="text/template" id="putTask_template">

    <div class="inform">
        <table cellspacing="0">
            <tr class="inform_odd inform_header">
                <th>任务标题</th>
                <th>截止时间</th>
                <th>提交情况</th>
                <th>修改任务</th>
            </tr>
            <% putTask.forEach(function(value,index){ %>
            <tr class="inform_even inform_odd">
                <td><%= value.title %></td>
                <td><%= value.Endtime %></td>
                <td>点击查看</td>
                <td class="modify">点击修改</td>
            </tr>
            <% }); %>
        </table>
    </div>
</script>


<script type="text/template" id="boardCast_template">
    <form  class="pub_boardcast">
        <section>
            <label for="department">部门</label>

            <select name="department" id="department" value="<%= department ? department : '' %>">
                <option value="Web研发部">Web研发部</option>
                <option value="移动开发部">移动开发部</option>
                <option value="视觉设计部">视觉设计部</option>
                <option value="管理规划部">管理规划部</option>
                <option value="运营维护部">运营维护部</option>
            </select>
        </section>
        <section>
            <label for="B_title">标题</label>
            <input type="text" name="title" id="B_title"  value="<%= title ? title : '' %>"  />
        </section>
        <section>
            <label for="B_content">内容</label>
            <textarea name="content" id="B_content" cols="40" rows="20"><%= content ? content : '' %></textarea>
        </section>
        <input type="hidden" name="id" value="<%= id ? id : '' %>"/>
        <input type="submit" name="submit" value="提交" />
    </form>
</script>

<script type="text/template" id="broadcast">
    </div>
    <% department.forEach(function(value, index){ %>
        <div class="annoce_con">
            <p class="title"><%= value.title %></p><%= index == 0 ? '<span class="title_logo">最新</span>' : "" %>
            <p class="host">发布人：<span class="host_name"><%= value.person %></span>
                发布时间：<span class="task_date"><%= value.time %></span></p>
            <input class="gai" type="button" name="gai" data-department="<%= value.id %>"  value="修改公告">
            <p class="annocement"><%= value.content %></p>
        </div>
    <% }); %>




</script>


<script type="text/template" id="publish_template">
    <form action="" method="post" id="publish_form">
        <div class="annoce_con">
            <section>
                <p>标题</p>
                <input name="title" id="title" placeholder="标题请不要超过30个字" />
            </section>
           <section>
                <label for="EndTime">截止日期</label><br/>
                <input type="text" name="Endtime" id="EndTime" placeholder="YYYY-MM-DD 00:00"/>
            </section>

            <section>
                <p>内容</p>
                <textarea name="details" id="task_content"  rows="20" placeholder="内容"></textarea>
            </section>
            <section class="peoples">
                <label for="student">全体学员</label><input type="radio" class="normal" id="student" name="context" value="2" />
                <label for="worker">全体干事</label><input type="radio" class="normal" id="worker" name="context" value="3"/>
                <label for="all">全体学员和干事</label><input type="radio"class="normal" id="all" name="context" value="4"/>
                <label for="others">其他</label><input type="radio" id="others" name="context" value="0"/>
            </section>
            <section class="people_choose">
                <input type="hidden" id="stu_id" name="stu_id"  value="0" />
                <!--<input type="text"  placeholder="人员选择" class="hidden"/>-->
            </section>

            <ul data-people='[{"std_name":"DB","id":10},{"std_name":"SB","id":20}]'>
            </ul>
            <input type="submit" id="submit" name="submit" value="发布任务">
        </div>
    </form>
</script>

<script type="text/template" id="personal_template">
    <form action="" method="post" id="personal_form">
        <section>
            <label for="std_username">姓名</label>
            <input type="text" id="std_username" name="std_username" value="<%= personal.std_name %>" />
        </section>
        <section>
            <label for="std_department">部门</label>
            <input type="text" id="std_department" name="std_department" value="<%= personal.std_department %>" />
        </section>
        <section>
            <label for="std_teacher">导师</label>
            <input type="text" id="std_teacher" name="std_teacher" value="<%= personal.std_teacher %>" />
        </section>
        <section>
            <label for="std_id">学号</label>
            <input type="text" id="std_id" name="std_id" value="<%= personal.std_id %>" />
        </section>
        <section>
            <label for="std_phone">手机</label>
            <input type="text" id="std_phone" name="std_phone" value="<%= personal.std_phone %>" />
        </section>
        <section>
            <label for="std_qq">QQ</label>
            <input type="text" id="std_qq" name="std_qq" value="<%= personal.std_qq %>" />
        </section>
        <section>
            <label for="std_email">邮箱</label>
            <input type="text" id="std_email" name="std_email" value="<%= personal.std_email %>"  />
        </section>

        <input type="submit" name="submit" value="提交"  />
    </form>
</script>


<script type="text/template" id="password_template">
    <form id="password_form">
        <section>
            <label for="originPsw">原密码</label>
            <input type="password" id="originPsw" name="originPsw" />
        </section>
        <section>
            <label for="newPsw">新密码</label>
            <input type="password" id="newPsw"  class="password" name="newPsw" />
        </section>
        <section>
            <label for="repeat">重复密码</label>
            <input type="password" class="password" id="repeat" />
        </section>

        <input type="submit" value="提交" name="submit" />
    </form>
</script>

<script src="js/Lib/jquery.min.js"></script>
<script src="js/Lib/underscore-min.js"></script>
<script src="js/Lib/backbone-min.js"></script>
<script src="js/Lib/plugin.js"></script>
<script src="js/lib/xhr.js"></script>
<script type="text/javascript">
    var URL = {
        "login" : "http://localhost:8888/login",
        "register" : "http://localhost:8888/register",
        "workplace" : "http://localhost:8888/workplace",
        "workplace_mission" : "http://localhost:8888/workplace/mission",
        "personal" : "http://localhost:8888/workplace/personal",
        "mission" : "http://localhost:8888/mission",
        "loginout" : "http://localhost:8888/loginout",
        "showtask" : "http://localhost:8888/mission/submit",
        "broadcast":"http://localhost:8888/workplace/broadcast",
        "broadcastEdit" : "http://localhost:8888/workplace/broadcastEdit",
        "broadcastPub" : "http://localhost:8888/workplace/broadcastPub",
        "publish" : "http://localhost:8888/mission/publish",
        "upload" : "http://localhost:8888/upload"
    };

    Backbone.emulateHTTP = true;
</script>
<script src="js/Common/page.js"></script>
<script src="js/Common/main.js"></script>
<script src="js/Model/task_model.js"></script>
<script src="js/Collection/task_collection.js"></script>
<script src="js/Router/task_router.js"></script>
<script src="js/View/task_view.js"></script>
<script src="js/Common/main.js"></script>
<script>
    Backbone.history.start();
</script>
</html>